export default function () {
    const { host, protocol } = location
    if (process.env.NODE_ENV === 'development') {
        return host
    }
    let ws = 'wss://'
    if (protocol === 'http:') {
        ws = 'ws://'
    }
    if (host.includes('public')) {
        return ws + 'public.hterobot.com'
    } else {
        return ws + 'oj.hterobot.com'
    }
}